package com.lanou3g.learn;

import java.util.ArrayList;

/**
 * Created by dllo on 18/4/13.
 */
public class Computer {
    private USB usb;

    private ArrayList<String> datas = new ArrayList<>();

    public USB getUsb() {
        return usb;
    }

    public void setUsb(USB usb) {
        this.usb = usb;
    }

    public ArrayList<String> getDatas() {
        return datas;
    }

    public void setDatas(ArrayList<String> datas) {
        this.datas = datas;
    }

    public void getDateFromUSB() {
        String data = usb.sendData();
        this.datas.add(data);

    }

    public void showDatas() {
        for (String data : datas) {
            System.out.println(data);
        }
    }


}

